import request from '@/utils/request'

// // 取得所有有效的厂家信息，用于下拉框显示
// export function listDropdownManufacturer() {
//   return request({
//     url: '/device/manufacturer/listDropdown',
//     method: 'get',
//     // params: query
//   })
// }

// 查询厂家列表
export function listManufacturer(query) {
  return request({
    url: '/device/manufacturer/list',
    method: 'get',
    params: query
  })
}

// 查询厂家详细
export function getManufacturer(id) {
  return request({
    url: '/device/manufacturer/' + id,
    method: 'get'
  })
}

// 新增厂家
export function addManufacturer(data) {
  return request({
    url: '/device/manufacturer',
    method: 'post',
    data: data
  })
}

// 修改厂家
export function updateManufacturer(data) {
  return request({
    url: '/device/manufacturer',
    method: 'put',
    data: data
  })
}

// 删除厂家
export function delManufacturer(id) {
  return request({
    url: '/device/manufacturer/' + id,
    method: 'delete'
  })
}
